home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 42
/
042.d81
/
home sale
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
12KB
|
325 lines
0 print""chr$(142):rem lock into uppercase
1 clr:poke53280,0:poke53281,6:poke788,52
2 gosub 8000
3 gosub 9000
8 goto1000
20 qq=0:printtab(8)"is this correct? (y/n)[159]"
22 geta$
24 ifa$="[206]"ora$="n"thenqq=1:return
25 ifa$="[217]"ora$="y"thenreturn
26 goto22
30 print"[147]"spc(10)"h o m e s a l e"
32 print"[155]round all amounts to the nearest dollar."
33 print"[145] press return if amount is zero."
34 print" press q at any time to quit"
36 return
40 k$="":te=peek(646):print" - [158]";:poke198,0.
41 print" [157][146]";:fort=1to50:next:print" [157][158]";
42 geta$:ifa$=""then41
43 ifa$="q"then10000
44 ifa$=chr$(13)thenprint:poke646,te:return
45 ifa$=chr$(20)andlen(k$)thenprint"[157] [157]";:k$=left$(k$,len(k$)-1):goto41
46 iflen(k$)>6then41
47 ifa$<"0"ora$>"9"then41
48 printa$;:k$=k$+a$
49 goto41
300 rem**menu page 3
310 print"[147]":printtab(3)"[158]calculating gain on sale of a home[146]"
315 print"[159]sale & purchase of principal residence"
340 printtab(9):print"[152](menu: screen 3 of 3)"
350 print"[158]7. gain postponed & new home basis"
355 print"q. to quit and exit to loadstar"
380 print"[155](note: round all amounts to the nearest dollar)"
390 get a$:ifa$<>"7" and a$<>"q" then goto 390
391 if a$="7" then goto 7000
395 if a$="q" then goto 10000
1000 gosub30:printtab(7)"[158]purchase price of old home[146][154]"
1040 print"price paid for house (press return if"
1050 print"house is a gift)";:gosub40:aa$=k$
1060 aa=val(aa$)
1070 print"transfer tax paid";
1080 gosub40:ab$=k$
1090 ab=val(ab$)
1100 print"attorney's fees paid";
1110 gosub40:ac$=k$
1120 ac=val(ac$)
1130 printtab(7)"purchase price=[146] $";aa+ab+ac
1140 az=aa+ab+ac
1150 gosub20:ifqqthen1000
2000 gosub30:printtab(11)"[158]basis on old home[146][154]"
2010 print"[154]select basis category (1, 2, [154]or 3[154])"
2020 print"1. [159]home was purchased"
2025 print"2. [159]home was a gift"
2030 print"3. [159]home was inherited[154]"
2040 geta$:ifa$<"1"ora$>"3"then2040
2045 ifa$="1"then3000
2050 ifa$<>"2"then2110
2060 print"enter the lesser of either the"
2070 print"fair market value or the donor's"
2080 print"adjusted basis at time of"
2085 print"acquisition";:gosub40:bz$=k$:bz=val(k$)
2090 printtab(7)"basis on old home[146] = $";bz
2091 gosub20:ifqqthen2000
2095 goto3000
2110 print"[154]inheritance basis (fair market"
2120 print"value)";:gosub40:bb$=k$:bz=val(bb$)
2130 printtab(7)"basis on old home[146] = $";bz
2140 gosub20:ifqqthen2000
3000 gosub30:printtab(7)"[158]adjusted basis of old home[146][154]"
3040 print"cost of improvements made (if covered"
3050 print"elsewhere, press return)";:gosub40:ca$=k$:ca=val(ca$)
3080 print"cost of further additions to your"
3081 print"home";:gosub40:cb$=k$:cb=val(cb$)
3090 print"cost of assessments (for example,"
3100 print"sidewalks and streets)";:gosub40:cc$=k$:cc=val(cc$)
3110 print"if house was a gift, enter any"
3120 print"transfer tax paid";:gosub40:ck$=k$:ck=val(ck$)
3130 print"if house was a gift enter any"
3140 print"attorney's fees paid";:gosub40:cl$=k$:cl=val(cl$)
3150 cd=ca+cb+cc+ck+cl
3160 gosub20:ifqqthen3000
3180 gosub30:printtab(7)"[158]adjusted basis of old home[146]"
3190 print"[154]amount of fire or other casualty"
3195 print"losses";:gosub40:ce$=k$:ce=val(ce$)
3200 print"payments you receive for easements or"
3210 print"rights-of-way you give up";:gosub40:cf$=k$:cf=val(cf$)
3220 print"amount of depreciation on home";:gosub40:cg$=k$:cg=val(cg$)
3230 print"amount of residential energy credit"
3235 print"claimed";:gosub40:ch$=k$:ch=val(ch$)
3240 ci=ce+cf+cg+ch
3250 cj=bz+cd
3260 cz=cj-ci
3270 printtab(3)"[154]adjusted basis old home = ";cz
3280 gosub20:ifqqthen3180
4000 gosub30:printtab(12)"[158]cost of new home[146][154]"
4040 print"transfer tax paid on new home";:gosub40:db$=k$:db=val(db$)
4050 print"attorney's fees paid";:gosub40:dc$=k$:dc=val(dc$)
4060 print"price paid for house (including"
4070 print"closing costs and any debts it is"
4080 print"subject to)";:gosub40:da$=k$:da=val(da$)
4090 dz=da+db+dc
4100 print"cost of new home=[146] $";dz
4110 gosub20:ifqqthen4000
5000 gosub30:printtab(12)"[158]selling expenses[146][154]"
5040 print"commissions paid";:gosub40:ea$=k$:ea=val(ea$)
5050 print"advertising costs paid";:gosub40:eb$=k$:eb=val(eb$)
5060 print"placement fees or 'points' paid";:gosub40:ec$=k$:ec=val(ec$)
5070 print"legal fees paid";:gosub40:ed$=k$:ed=val(ed$)
5080 print"transfer tax on sale of old home";:gosub40:ee$=k$:ee=val(ee$)
5090 print"sum of other closing cost items";:gosub40:ef$=k$:ef=val(ef$)
5100 ez=ea+eb+ec+ed+ee+ef
5110 print"selling expenses=[146] $";ez
5120 gosub20:ifqqthen5000
6000 gosub30:printtab(11)"[158]fixing up expenses[146]"
6010 print"[154]enter all expenses for work done"
6020 print"within 90[154] days before signing contract"
6030 print"to sell, and paid for within 30[154] days"
6040 print"after the sale. (these items cannot be"
6050 print"capital improvements; these only add"
6060 print"to your basis on the home.)"
6070 print"press return when finished[154]"
6080 fori=1to10
6090 print"cost of item"i;:gosub40:f$(i)=k$
6100 iff$(i)=""theni=10
6110 next
6220 fz=0:fori=1to9:fz=fz+val(f$(i)):next
6230 print"fixing up expenses=[146] $";fz
6240 gosub20:ifqqthen6000
7000 gosub30
7010 printtab(6)"[158]gain on sale of old home and"
7011 printtab(11)"basis of new home[146][144]"
7015 print"[154]selling price of old home";
7016 gosub40:ga$=k$:ga=val(ga$)
7018 print"[147]":printtab(10)"[158]gain on sale of homes[146][154]"
7020 print"selling expenses...........$";ez
7023 gb=ga-ez
7025 print"amount realized............$";gb
7030 print"basis of old home..........$";bz
7035 print"adjusted basis"
7036 print"of old home................$";cz
7040 gc=gb-cz
7041 print"[155]gain on old home...........$";gc
7045 gd=cz+gc
7046 print"amount realized"
7047 print"on old home................$";gd
7048 printtab(8)"press space to continue"
7049 geta$:ifa$<>" "then7049
7050 print"[147]":printtab(10)"[158]gain on sale of homes[146]"
7051 print"[154]fixing up"
7052 print"expenses...................$";fz
7053 ge=gd-fz
7054 print"adjusted sales price.......$";ge
7060 print"cost of new home...........$";dz
7065 gf=ge-dz
7066 print"gain not postponed.........$";gf
7070 gg=gc-gf
7071 print"gain postponed.............$";gg
7080 gh=dz-gg
7081 print"[154]cost of new home...........$";dz
7082 print"minus gain postponed.......$";gg
7085 print"= basis of new home = ....$";gh
7090 printtab(8)"press space to continue"
7091 geta$:ifa$<>" "then7091
7100 print"[147]":print"do you want a printed copy [158](y/n)[154]?"
7110 gosub22:ifqq=0then11000
7120 print"[147] [158]press h[158] to return to home sale or"
7130 print" press l[158] to return to loadstar"
7135 printtab(12)"*** warning: [146]***"
7136 print"[152]returning to home sale will result in"
7137 printtab(12)"loss of all data"
7138 poke198,0
7140 geta$:ifa$<>"h"anda$<>"l"then7140
7150 ifa$="h"thenrun
7160 printtab(9)"[158]returning to loadstar"
7165 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15:print""
7166 ifer<>63 then print"[147]":end
7170 load "hello connect",8:end
8000 print"[147]"
8030 poke53280,6:poke53281,0:print"[147][150] [213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201]
8040 [153]"def peek(NULL)lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenright$defpeek
8050 print" [194][194] loadstar presents [194][150][194]
8060 [153]" peekpeek peekdefpeek
8070 print" [194][194] home sale tax computation [194][150][194]
8080 [153]" peekpeek peekdefpeek
8090 print" [194][194] by [194][150][194]
8100 [153]" peekpeek peekdefpeek
81